<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>设置</title>
		<link rel="stylesheet" type="text/css" href="__API__/lib/css/swiper.min.css">
		<link rel="stylesheet" type="text/css" href="__API__/lib/css/mui.css?v=1">
		<link rel="stylesheet" type="text/css" href="__API__/lib/css/mobileSelect.css" />
		<link rel="stylesheet" href="__API__/lib/css/style.css">
		<script type="text/javascript" src="__API__/lib/js/jquery-1.11.0.min.js"></script>
		<script type="text/javascript" src="__API__/lib/js/mui.js"></script>
		<script src="__API__/lib/js/mobileSelect.js" type="text/javascript" charset="utf-8"></script>
		<script src="__API__/lib/js/city.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="__API__/lib/js/swiper.min.js"></script>
		<script type="text/javascript" src="__API__/lib/js/vue.min.js"></script>
		<script type="text/javascript" src="__API__/lib/js/common.js"></script>
		<script type="text/javascript" src="__API__/lib/js/index.js"></script>
	<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script></head>
	<style>
		.set_list li .left span {
			display: block;
			font-size: .26rem;
			color: #333;
		}
	</style>
	<body>
		<div class="page_box" id="app">
			<ul class="set_list">
				<li @click="initWechat()">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon6.png" alt="" /></div>
						<span>解除微信头像和昵称绑定</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="goDetail('update_information.html')">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon1.png" alt="" /></div>
						<span>修改资料</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="goDetail('my_address.html')">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon2.png" alt="" /></div>
						<span>地址管理</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="goDetail('update_loginpsd.html')">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon3.png" alt="" /></div>
						<span>修改登录密码</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="goDetail('update_paypsd.html')">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon3.png" alt="" /></div>
						<span>修改支付密码</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="goDetail('my_bank.html')">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon5.png" alt="" /></div>
						<span>我的银行</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>
				<li @click="logOut()">
					<div class="left">
						<div class="icon"><img src="__API__/lib/images/set_icon6.png" alt="" /></div>
						<span>退出登录</span>
					</div>
					<div class="arrow"><img src="__API__/lib/images/more.png" alt=""></div>
				</li>

			</ul>
		</div>
		<script>
			var app = null;
			app = new Vue({
				el: '#app',
				data: {},
				created: function() {
					var that = this;
				},
				methods: {
					goDetail(url) {
						common.openUrl(url)
					},
					// 退出登录
					logOut() {
						common.Confirm('是否确认退出？', ' ', function() {
							console.log('out')
							localStorage.clear()
							common.openUrl('login.html' );
						})
					},
					initWechat() {
						common.Confirm('是否解绑微信头像和昵称绑定？', ' ', function() {
							console.log('out')
							let that = this;
							let data = {
								token:localStorage.getItem('token'),

							}
							common.ajax("{:url('Member/init_wechat')}", data, function(res) {
								common.showToast(res.msg);
								if (res.code == 200) {
									localStorage.clear()
									setTimeout(function(){
										common.openUrl('login.html' );
									},1000)
								}

							})
						})
					}
				}
			});
		</script>
	</body>

</html>
